package org.helgoboss.document_database

trait Database {
    def buckets: Iterable[Bucket]
    
    def findBucket(id: String): Option[Bucket]
    
    def addBucket(id: String): Bucket
    
    def removeBucket(bucket: Bucket)
            
    def findOrAddBucket (id: String): Bucket = {
        findBucket(id) getOrElse addBucket(id)
    }
}